/**
 * Copyright (C) 2013 Bohan
 *
 * This file is part of the Java SACNR API.
 *
 * Java SACNR API is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Java SACNR API is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
import bohan.sacnr.api.*;

/**
 *
 * @author Bohan
 */
public class Example {
    public static void main(String[] args) throws Exception
    {
        Player player = new Player("Greenkeeper");
        System.out.println("Player Name: " + player.getPlayerName());
        System.out.println("Player ID: " + player.getPlayerID());
        System.out.println("Skin ID: " + player.getSkinID());
        System.out.println("Regular player level: " + player.getRegularPlayerLevel());
        System.out.println("Staff: " + player.isStaff());
        System.out.println("Donating player: " + player.isDonatingPlayer());
        System.out.println("Online: " + player.isOnline());
        System.out.println("Banned: " + player.isBanned());
        System.out.println("Played: " + player.getTimePlayed());
        System.out.println("Registered: " + player.getTimeRegistered());
        System.out.println("Last Login: " + player.getTimeLastLogin());
        
        GeneralStats pg = player.getGeneralStats();
        System.out.println("\n General stats-");
        System.out.println("Total Connect Time: " + pg.getTotalConnectTime());
        System.out.println("Total Alive Time: " + pg.getTotalAliveTime());
        System.out.print("Friends: ");
        for (String str : pg.getFriends())
            System.out.print(str + " ");
        System.out.println();
        for (Business biz : pg.getBusinesses())
            System.out.println("Owned Businesses: " + biz.getName());
        for (House house : pg.getHouses())
            System.out.println("Owned Houses: " + house.getName());
        
        /*Business business = new Business(118);
        System.out.println("Business Name: " + business.getName());
        System.out.println("Owner: " + business.getOwner());
        System.out.println("Last visit: " + business.getLastOwnerVisit()[0] + ", "
                + business.getLastOwnerVisit()[1]);
        System.out.println("Value: " + business.getValue());
        System.out.println("Security: " + business.getSecurity());
        System.out.println("Bank: " + business.getBank());
        System.out.println("Stock: " + business.getStock());
        System.out.print("Employees: ");
        for (String str : business.getEmployees())
            System.out.print(str + " ");
        System.out.println("\nLocation: " + business.getLocation());
        System.out.println("Coordinates: " + business.getCoordinates()[0] + ", "
                + business.getCoordinates()[1]);*/
        
        /*House house = new House(1078);
        System.out.println("Business Name: " + house.getName());
        System.out.println("Owner: " + house.getOwner());
        System.out.println("Last visit: " + house.getLastOwnerVisit()[0] + ", "
                + house.getLastOwnerVisit()[1]);
        System.out.println("Value: " + house.getValue());
        System.out.print("Player with keys: ");
        for (String str : house.getPlayerWithKeys())
            System.out.print(str + " ");
        System.out.println("\nLocation: " + house.getLocation());
        System.out.println("Coordinates: " + house.getCoordinates()[0] + ", "
                + house.getCoordinates()[1]);*/
        
        MoneyStats money = player.getMoneyStats();
        System.out.println("\n Money stats-");
        System.out.println("Net Worth: " + money.getNetWorth());
        System.out.println("Earned: " + money.getCashEarned());
        System.out.println("Spent: " + money.getCashSpent());
        System.out.println("Med Fees Paid: " + money.getMedicalFeesPaid());
        System.out.println("Cash Given: " + money.getCashGiven()[0] + " " +
                money.getCashGiven()[1]);
        System.out.println("Cash Received: " + money.getCashReceived()[0] + " " +
                money.getCashReceived()[1]);
        System.out.println("Food Purchased: " + money.getFoodPurchased()[0] + " " +
                money.getFoodPurchased()[1]);
        System.out.println("Weapons Purchased: " + money.getWeaponsPurchased()[0] + " " +
                money.getWeaponsPurchased()[1]);
        System.out.println("Money Bags Found: " + money.getMoneyBagsFound()[0] + " " +
                money.getMoneyBagsFound()[1]);
        
    }
}
